package com.zhijian.medical.service;

import com.zhijian.medical.entity.po.ExperimentProcessSpecimen;
import com.zhijian.medical.entity.vo.request.ExperimentProcessSpecimenSearchVo;
import com.zhijian.medical.entity.vo.response.ExperimentProcessSpecimenBatchVo;
import com.zhijian.medical.entity.vo.response.ExperimentProcessSpecimenVo;
import com.zhijian.medical.util.Page;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * 实验流程-临床标本标识和扩增位置 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2022-04-09 17:06:41
 */
public interface ExperimentProcessSpecimenService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    ExperimentProcessSpecimen selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    ExperimentProcessSpecimenVo selectVoById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 新增
     *
     * @param experimentProcessSpecimen
     * @return
     */
    Long insert(ExperimentProcessSpecimen experimentProcessSpecimen);

    /**
     * 动态新增
     *
     * @param param
     * @return
     */
    boolean insertBySelective(Map<String, List<String>> param);

    /**
     * 新增or修改
     *
     * @param experimentProcessSpecimen
     * @return
     */
    Long insertOrUpdate(ExperimentProcessSpecimen experimentProcessSpecimen);

    /**
     * 更改
     *
     * @param experimentProcessSpecimen
     * @return
     */
    boolean update(ExperimentProcessSpecimen experimentProcessSpecimen);

    /**
     * 总数
     *
     * @param experimentProcessSpecimenSearchVo
     * @return
     */
    Integer count(ExperimentProcessSpecimenSearchVo experimentProcessSpecimenSearchVo);

    /**
     * 列表
     *
     * @param experimentProcessSpecimenSearchVo
     * @return
     */
    List<ExperimentProcessSpecimenVo> selectList(ExperimentProcessSpecimenSearchVo experimentProcessSpecimenSearchVo);

    /**
     * 分页查询
     *
     * @param experimentProcessSpecimenSearchVo
     * @return
     */
    Page<ExperimentProcessSpecimenVo> selectPage(ExperimentProcessSpecimenSearchVo experimentProcessSpecimenSearchVo);

    /**
     * 根据实验流程id进行删除
     *
     * @param experimentProcessId
     * @return
     */
    void deleteByExperimentProcessId(Long experimentProcessId);

    /**
     * 根据实验流程id与设备idl进行删除
     *
     * @param experimentProcessId
     * @param deviceId
     * @return
     */
    void deleteByExperimentProcessIdAndDeviceId(Long experimentProcessId, Long deviceId);

    /**
     * 根据实验流程id进行查找
     *
     * @param experimentProcessId
     * @return
     */
    ExperimentProcessSpecimenVo selectVoByExperimentProcessId(Long experimentProcessId);

    /**
     * 根据实验流程id进行查找
     *
     * @param experimentProcessId
     * @param deviceId
     * @return
     */
    ExperimentProcessSpecimenVo selectVoByExperimentProcessIdAndDeviceId(Long experimentProcessId, Long deviceId);

    /**
     * 返回一个实验流程的值
     *
     * @param experimentProcessId
     * @return
     */
    ExperimentProcessSpecimenBatchVo selectExperimentProcessSpecimenBatchVoByExperimentProcessId(Long experimentProcessId);

    /**
     * 返回一个实验流程里一个扩增仪的值
     *
     * @param experimentProcessId
     * @param deviceId
     * @return
     */
    ExperimentProcessSpecimenBatchVo selectExperimentProcessSpecimenBatchVoByExperimentProcessIdAndDeviceId(Long experimentProcessId, Long deviceId);

    /**
     * 导入Excel
     *
     * @param experimentProcessId
     * @param deviceId
     * @param file
     * @return
     */
    boolean importExcel(Long experimentProcessId, Long deviceId, MultipartFile file);
}